@use "../../securityTool/securityTool.scss" as securityTool;
@use "../plugins.scss";

.plugin-batch-wrapper {
    height: 100%;
    display: flex;
    .plugin-tab-wrap {
        height: 100%;
        .plugin-tab {
            width: 24px;
            height: 100%;
            background: var(--Colors-Use-Neutral-Bg-Hover);
            &-item {
                padding: 12px 4px;
                cursor: pointer;
                transform: rotate(180deg);
                font-size: 12px;
                font-weight: 600;
                line-height: 16px;

                text-orientation: sideways-right;
                writing-mode: vertical-rl;
                border-top: 1px solid var(--Colors-Use-Neutral-Border);
                &:hover {
                    background: var(--Colors-Use-Neutral-Bg-Hover);
                }
                &-active {
                    color: var(--Colors-Use-Main-On-Primary);
                    background-color: var(--Colors-Use-Main-Primary);
                    &:hover {
                        background-color: var(--Colors-Use-Main-Hover);
                    }
                }
                &-unshowCont {
                    background-color: var(--Colors-Use-Main-Border);
                }
            }
        }
    }
}

%display-align-start {
    display: flex;
    align-items: flex-start;
}

.plugin-batch-executor-wrapper {
    @include securityTool.execute-title("plugin-batch");
}
.plugin-batch-executor-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    .divider-style {
        width: 1px;
        height: 12px;
        background-color: var(--Colors-Use-Neutral-Bg);
    }
}
.plugin-batch-execute-form-wrapper {
    display: grid;
    grid-template-rows: 1fr;
    transition: all 0.3s ease;
    padding-top: 16px;
    :global {
        .ant-form {
            overflow: hidden;
        }
    }
    .plugin-execute-form-item {
        width: 100%;
    }
    .plugin-execute-form-operate {
        @extend %display-flex-center;
        gap: 8px;
    }
}
.plugin-batch-execute-form-wrapper-hidden {
    grid-template-rows: 0fr;
    padding-top: 0;
}

.plugin-batch-execute-extra-params-drawer {
    :global {
        .ant-drawer-body {
            padding: 0;
        }
        .ant-collapse-item:first-child > .ant-collapse-header {
            border-top: 0;
        }
    }
}

.plugin-batch-executor-body {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: auto !important;
    :global {
        .plugin-details-item-wrapper {
            cursor: pointer;
        }
    }
}

.to-end {
    text-align: center;
    color: var(--Colors-Use-Neutral-Disable);
    font-size: 11px;
    padding-top: 12px;
    padding-bottom: 24px;
}

.right-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;

    .plugin-executor-result-wrapper {
        padding: 12px;
    }
    .log-wrapper {
        display: flex;
        flex-direction: column;
        flex: 1;
        overflow: hidden;
        max-width: 300px;
        border-right: 1px solid var(--Colors-Use-Neutral-Border);
        padding: 12px;
        gap: 8px;
        .log-heard {
            color: var(--Colors-Use-Neutral-Text-1-Title);
            font-size: 12px;
            font-weight: 600;
            line-height: 16px;
        }
    }
}

%svg {
    width: 16px;
    height: 16px;
    svg {
        width: 16px;
        height: 16px;
    }
}
.table-status-item {
    @extend %display-flex-center;
    gap: 4px;
    .status-text {
        color: var(--Colors-Use-Neutral-Text-1-Title);
        font-size: 12px;
        font-weight: 400;
        line-height: 16px;
    }
    .icon-success {
        @extend %svg;
        color: var(--Colors-Use-Success-Primary);
    }
    .icon-primary {
        @extend %svg;
        color: var(--Colors-Use-Main-Primary);
        animation: spin 1s infinite linear;
    }
    .icon-helper {
        @extend %svg;
        color: var(--Colors-Use-Neutral-Disable);
    }
    .icon-danger {
        @extend %svg;
        color: var(--Colors-Use-Error-Primary);
    }
    .icon-question {
        @extend %svg;
        color: var(--Colors-Use-Neutral-Disable);
        cursor: pointer;
        &:hover {
            color: var(--Colors-Use-Main-Primary);
        }
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
